package com.appspot.didit.test.datastore;

import javax.jdo.PersistenceManager;
import com.appspot.didit.server.PMF;
import com.appspot.didit.server.UtilServer;

public class UserHashDatastoreTestCase extends LocalDatastoreTestCase {
	
	PersistenceManager pm = PMF.get().getPersistenceManager();
	/*
	public void testInsertAndSelect() {
		String username = "xinyan.lei";
		String password = "123456";
	    UserHash uh = new UserHash(username, UtilForTest.encrypt(username, password));
	    try {
	    	pm.makePersistent(uh);
		    UserHash uh1 = pm.getObjectById(UserHash.class, uh.getId());
		    assertEquals("xinyan.lei", uh1.getUsername());
			assertEquals("xinyan.lei", UtilForTest.decrypt(uh1.getEncryptedUsername(), password));
	    } catch (Exception e) {
	    	System.out.println(e.toString());
	    	assertTrue(false);
	    } finally {
	      pm.close();
	    }
	}
	/*
	public void testDelete() {
	    try {

	    } catch (Exception e) {
	    	System.out.println(e.toString());
	    	assertTrue(false);
	    } finally {
	      pm.close();
	    }
	}
	
	public void testUpdate() 
	    try {
	  
	    } catch (Exception e) {
	    	System.out.println(e.toString());
	    	assertTrue(false);
	    } finally {
	      pm.close();
	    }

	}
*/
}
